using Admin.NET.Core;
using MOKA.TPM.Entity;
using System.ComponentModel.DataAnnotations;

namespace MOKA.TPM.Service.Dto;

/// <summary>
/// 页面输出参数 （调拨明细）
/// </summary>
public class PartMoveDOutput : PartMoveD
{
    /// <summary>
    /// 原仓位 （字典名称）
    /// </summary>
    public string? LocationName { get; set; }

    /// <summary>
    /// 到仓位 （字典名称）
    /// </summary>
    public string? ToLocationName { get; set; }

    /// <summary>
    /// 关联对象等
    /// </summary>
    //public string? WePartyLevelName { get; set; }
}

/// <summary>
/// 单ID查询参数
/// </summary>
public class PartMoveDInput
{
    /// <summary>
    /// </summary>
    public long? Id { get; set; }
}

/// <summary>
/// 普通查询参数
/// </summary>
public class GetPartMoveDInput : BaseOrderInput
{
}

/// <summary>
/// 分页查询参数
/// </summary>
public class PagePartMoveDInput : BasePageInput
{
}

/// <summary>
/// 新增记录参数
/// </summary>
public class AddPartMoveDInput
{
    /// <summary>
    /// 业务号
    /// </summary>
    [Required, MaxLength(50)]
    public string BillNo { get; set; } = string.Empty;

    /// <summary>
    /// 物料编号
    /// </summary>
    [Required, MaxLength(50)]
    public string PartNo { get; set; } = string.Empty;

    /// <summary>
    /// 调拨数量
    /// </summary>
    public decimal MoveNum { get; set; }

    /// <summary>
    /// 批次号
    /// </summary>
    [MaxLength(10)]
    public string? BatchNumber { get; set; }

    /// <summary>
    /// 原仓位
    /// </summary>
    public Guid Location { get; set; }

    /// <summary>
    /// 到仓位
    /// </summary>
    public Guid ToLocation { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    [MaxLength(200)]
    public string? Remark { get; set; }
}

/// <summary>
/// 更新参数
/// </summary>
public class UpdatePartMoveDInput
{
    /// <summary>
    /// </summary>
    public long Id { get; set; }

    /// <summary>
    /// 业务号
    /// </summary>
    [MaxLength(50)]
    public string BillNo { get; set; }

    /// <summary>
    /// 物料编号
    /// </summary>
    [MaxLength(50)]
    public string PartNo { get; set; }

    /// <summary>
    /// 调拨数量
    /// </summary>
    public decimal MoveNum { get; set; }

    /// <summary>
    /// 批次号
    /// </summary>
    [MaxLength(10)]
    public string? BatchNumber { get; set; }

    /// <summary>
    /// 原仓位
    /// </summary>
    public Guid Location { get; set; }

    /// <summary>
    /// 到仓位
    /// </summary>
    public Guid ToLocation { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    [MaxLength(200)]
    public string? Remark { get; set; }
}

/// <summary>
/// 删除参数
/// </summary>
public class DeletePartMoveDInput
{
    /// <summary>
    /// </summary>
    public long Id { get; set; }
}

/// <summary>
/// 更新部分数据参数
/// </summary>
public class UpdateSomePartMoveDInput
{
    /// <summary>
    /// </summary>
    public long Id { get; set; }
}